package com.starry.module.system.api.logger.factory;

import com.starry.core.common.domain.R;
import com.starry.module.system.api.logger.SysLogOperationApi;
import com.starry.module.system.api.logger.domain.qo.SysLogOperationQo;
import org.springframework.cloud.openfeign.FallbackFactory;

/**
 * RPC-操作日志访问熔断处理
 *
 * @author xiaoke
 */
public class SysLogOperationApiFactory implements FallbackFactory<SysLogOperationApi> {
    @Override
    public SysLogOperationApi create(Throwable cause) {
        return new SysLogOperationApi() {

            @Override
            public R<Long> save(SysLogOperationQo qo) {
                return R.fail();
            }
        };
    }
}
